package com.sumqun.mall.entity;

import java.io.Serializable;
import java.util.List;
import java.util.Date;
import com.google.common.collect.Lists;

import org.springframework.stereotype.Repository;
 
@Repository
public class Account implements Serializable{
	 
	private static final long serialVersionUID = 8751282105532159742L;	
	private Long   uid;
	private String username;
	private String password;
	private String sex;
	private Date birthday;
	private String email;	
	private String nickname;	
	private String address; 
	private String state;
	private String province;
	private String city;
	private String country;
	private String zip;	
	private String phone;
	private String status;
	private int  usertype ;
	private Date addtime;
	private Date lastlogin;
	private List<Role> roleList = Lists.newArrayList();  //有序的关联对象集合	
	
	
	/**
	 * 
	 */
	public Account() {
	 
	}
	
	
	/**
	 * @param username
	 * @param password
	 * @param sex
	 * @param birthday
	 * @param email
	 * @param nickname
	 * @param address
	 * @param usertype
	 */
	public Account(String username, String password, String sex, Date birthday,
			String email, String nickname, String address, int usertype) {		 
		this.username = username;
		this.password = password;
		this.sex = sex;
		this.birthday = birthday;
		this.email = email;
		this.nickname = nickname;
		this.address = address;
		this.usertype = usertype;
	}
	
	public Account(String username, String password, int usertype) {	 
		this.username = username;
		this.password = password;	 
		this.usertype = usertype;
	}


	public Long getUid() {
		return uid;
	}
	public void setUid(Long uid) {
		this.uid = uid;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getZip() {
		return zip;
	}
	public void setZip(String zip) {
		this.zip = zip;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public int getUsertype() {
		return usertype;
	}
	public void setUsertype(int usertype) {
		this.usertype = usertype;
	}
	public Date getAddtime() {
		return addtime;
	}
	public void setAddtime(Date addtime) {
		this.addtime = addtime;
	}
	public Date getLastlogin() {
		return lastlogin;
	}
	public void setLastlogin(Date lastlogin) {
		this.lastlogin = lastlogin;
	}
	public List<Role> getRoleList() {
		return roleList;
	}
	public void setRoleList(List<Role> roleList) {
		this.roleList = roleList;
	}


	@Override
	public String toString() {
		return "Account [uid=" + uid + ", username=" + username + ", password="
				+ password + ", sex=" + sex + ", birthday=" + birthday
				+ ", email=" + email + ", nickname=" + nickname + ", address="
				+ address + ", state=" + state + ", province=" + province
				+ ", city=" + city + ", country=" + country + ", zip=" + zip
				+ ", phone=" + phone + ", status=" + status + ", usertype="
				+ usertype + ", addtime=" + addtime + ", lastlogin="
				+ lastlogin + ", roleList=" + roleList + "]";
	}
	 
	
	
	
}